var React = require('react');
var Button = require('../../controls/Button');
var ToggleSwitch = require('../../controls/ToggleSwitch');
var Draggable = require('../../utils/Draggable');
module.exports = React.createClass({
	componentDidMount: function (){
		Draggable.init(this.refs['dg'].getDOMNode());
		Draggable.init(this.refs['dg1'].getDOMNode());
	},
	render:function(){
		return (
			<div className="v-main-index">
				<Button text="确定" float={true} icon="icon-IR" />
				<Button text="取消" icon="icon-IR" />
				<Button text="保存" icon="icon-IR" />
				<ToggleSwitch />
				<div className="draggable" ref="dg" style={{ border: '1px solid red', padding: 10 }}>Draggable Object</div>
				<div className="draggable" ref="dg1" style={{ border: '1px solid red', padding: 10 }}>xxxxxx</div>
			</div>
		);
	}
});
